package com.example.viewex;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ListView;

public class CustomListViewActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_custom_list_view);
		
		MyListAdapter ma = new MyListAdapter(this, R.layout.list);
		
		ListView iv = (ListView)findViewById(R.id.listView1);
		iv.setAdapter(ma);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {

		new OptionMenu(this, item);
		
		return super.onOptionsItemSelected(item);
	}
}
